<?php
use Illuminate\Support\Facades\Cache;
use App\Models\Home\Config;

if (!function_exists('get_config_cache')){
    function get_config_cache($key){

        $conf = new Config();

        $get = Cache::get($key, function() use ($key,$conf){

            $val = $conf->getConf($key);

            Cache::forever($key, $val);

            return $val;

        });

        return $get;
    }

}